/*
 * @Description: 文件描述
 * @Version: 1.0
 * @Author: YueXuanzi
 * @Date: 2024-09-09 14:55:12
 * @LastEditors: YueXuanzi
 * @LastEditTime: 2024-10-08 20:50:42
 * @心得体会: 无
 */

import request from '@/axios'

export function getCaptchaImg() {
    return request({
      url: '/captcha',
      method: 'get'
    })
}

export function checkToken(token) {
  return request({
    url: '/checkToken',
    method: 'get',
    headers:{
      token:token
    }
  })
}

export function login(data) {
  return request({
    url: '/login',
    method: 'post',
    data
  })
}

//退出登录
export function logout() {
  return request({
    url: '/logout',
    method: 'post'
  })
}

// 获取路由
export function getRouters(data) {
  return request({
    url: '/getRouters/' + data,
    method: 'get',
  })
}

export function updata(data){
  return request({
    url: '/updata',
    method: 'put',
    data
  })
}

// 修改图片
export function handleFileUpload(formData){
  return request({
    url: '/sys/doctor/file',
    method: 'post',
    body: formData
  })
}

export function addYue(data){
  return request({
    url: '/sys/patient/addYue',
    method: 'post',
    data
  })
}